import React from 'react'
import { useRoutes } from 'react-router-dom';
import './app.css'
import router from './router';
import Nav from './components/Nav/Nav';


// 测试useContext
// import A from './pages/testContext/A'

// 创建类式组件
export default function App() {

    // 创建路由对象
    let routes = useRoutes(router)

    return (
        <div className='app'>
            {/* 导航 */}
            <Nav />
            {/* 路由 */}
            {routes}
        </div>
    )

}
